<template>
<div>
  <carousels :items="carousels" />
  <card :dailySentence="dailySentence"/>
</div>
</template>

<script>
  /**
   * components
   */
  import Carousels from './homeChildren/Carousels/Carousels'
  import Card from './homeChildren/Card/Card'

  /**
   * network
   */
  import { getHomeData } from '../../network/home.js'

  /**
   * code
   */
  export default {
    name: 'Home',
    components: {
      Carousels,
      Card
    },
    data () {
      return {
        carousels: [],
        dailySentence: {}
      }
    },
    created(){
      getHomeData().then(res => {
        this.carousels = res.data.carousels
        this.dailySentence = res.data.dailySentence[0]
      })
    }
  }
</script>


<style scoped>

</style>